<%@ include file="/common/taglibs.jsp"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<div id="header" class="head" align="center">
	<div id="logoheader">
		 <div id="menuHeader">
				<c:if test="${!empty pageContext.request.remoteUser}">
					<script type="text/javascript">
					function userMoreinfo() {
	
					  if(window.event) event.cancelBubble = true;
		    			else evt.stopPropagation();
					    Ext.get("moreInfo").show();
					    }
				     function deadHidden() {
				        Ext.get("moreInfo").hide();
						};
					 Ext.onReady(function() {
					    window.document.onclick =deadHidden;
						});
function showMessageWindw(){
/**
 发送消息
*/
function sendOneMessage(){
  var win = new Ext.Window({
			title : '发送消息',
			id : 'sendMessageWindow',
            iconCls:'form-edit-icon',
			width: 400,
            height:300,
            modal: true,
			resizable:false,
            closeAction : 'close',
            closable:true,
            plain : true,
            //弹出模态窗体
			buttonAlign:"center",
			html:"<iframe name='sendMessageIframe' height='100%' width='100%' src='" +appConfig.contPath + "/system/ext/sendMessage.jsp" + "' frameborder=0 scrolling=no  ></iframe>"
		});
		win.show();

};
 function closeOpenWindow(){
 	 Ext.getCmp("sendMessageWindow").close();
 }
 app.closeWin = closeOpenWindow;  

	var tab = new Ext.TabPanel({
// 		width:400,
        activeTab: 0,
        frame:true,
        tbar: [{
        		iconCls:'note-edit',
            	text: '发送消息',
            	handler : sendOneMessage
            	}], 
            	
        defaults:{autoHeight: true},
        items:[{ 
	            title: '通　 知(<font color="red">${currentUsermsgCommCount}</font>)',
	            layout:'fit',
	            items:[{
	            xtype: 'grouptabpanel',
	            tabPosition:'left',
	    		tabWidth: 80,
	    		split:true,
	            height: 300,
	            width:550,
	            minSize: 175,
	            maxSize: 1280,
	    		activeGroup: 0 ,
	    		items: [{    			
	    			mainItem: 0,
	    			items: [{
		                title: '今天',
		                tabTip: '今天发来的消息',
						html: "<iframe name='contentfirstTab'  marginheight='0' align='left' src='/"+appConfig.appName+"/system/ext/systemMessage.jsp?flag=1' marginwidth='0' frameborder='0' width='100%' height='100%'  scrolling='no' id='contentfirstTab' ></iframe>"
	            	}]
            	},{    			
	    			mainItem: 0,
	    			items: [{	    			
		                title: '昨天',
		                tabTip: '昨天发来的消息',
						html: "<iframe name='contentfirstTab'  marginheight='0' align='left' src='/"+appConfig.appName+"/system/ext/systemMessage.jsp?flag=2' marginwidth='0' frameborder='0' width='100%' height='100%'  scrolling='no' id='contentfirstTab' ></iframe>"
	            	}]
            	},{    			
	    			mainItem: 0,
	    			items: [{	    			
		                title: '更早',
		                tabTip: '更早发来的消息',
						html:"<iframe name='contentfirstTab'  marginheight='0' align='left' src='/"+appConfig.appName+"/system/ext/systemMessage.jsp?flag=3' marginwidth='0' frameborder='0' width='100%' height='100%'  scrolling='no' id='contentfirstTab' ></iframe>"
	            	}]
            	}]
            }]},
            {   
                title: '系统消息(<font color="red">${currentUsermsgSysCount}</font>)',
            	html:"<iframe name='contentfirst3Tab'  marginheight='0' align='left' src='/"+appConfig.appName+"/system/ext/systemMessageNew.jsp' marginwidth='0' frameborder='0' width='100%' height='300'  scrolling='no' id='content3firstTab' ></iframe>"           
            }
        ] 	
	}); 	
  var win = Ext.getCmp('systemMessageWindow');	
 	if(!win){ 		  
		 win = new Ext.Window({
    		autoScroll:true,
    		title :'消息盒子',
    		minimizable: true,
    //		maximizable: true, //最大化
    		id: 'systemMessageWindow',
            width: 550,
            height:400,
            modal: false,
			resizable:false,
	//		collapsible:true, //允许缩放条
            closeAction : 'hide',
            closable:true,
            plain : true,
            //弹出模态窗体
			buttonAlign:"center",
			layout: 'fit',
			listeners: {
				minimize : function(e){
					e.hide('windowHideHere');
				}
			},
			items:[tab]	
        });
     }
	win.show();    		
};						
					</script>
					<ul id="menu-header" class="menuList">
					<li>
					<a title="个人信息修改" id="hideToMessage" href="javascript:void(0);"
						onclick="this.blur();userMoreinfo();">欢迎 <authz:authentication
							operation="fullName" /><small>▼</small>&nbsp;|</a>
					</li><li><a title="有(${currentUsermsgCount})条未读消息,请尽快处理" id="windowHideHere" href="javascript:void(0);"
					 onclick="showMessageWindw()">消息(<font color="red">${currentUsermsgCount}</font>)&nbsp;|</a>
					</li><li><a title="帮助文档下载"    href="<c:url value='/handbook.jsp'/>"  >帮助&nbsp;|</a>
					</li><li><a title="退出" href="<c:url value='/logout.jsp'/>">退出</a>
					</li></ul>

				</c:if>
			</div>
					<div class="moreInfo" id="moreInfo">
						<A class=gb2 href="javascript:void(0);" onclick="changeMessage()">信息维护</A>
						<A class=gb2 href="javascript:void(0);" onclick="changePassword()">密码修改</A>
					</div>
	</div>
	<div id="mainmenu">
	<div id="menu">
		<c:if test="${!empty pageContext.request.remoteUser}">
		<ul id="primary-menu" class="menuList">
			<li><a qtip="首&nbsp;&nbsp;页"<c:if test="${pitem=='1'}">class="current"</c:if>
			href="<c:url value='/project/qx/main.jsp'/>">综合信息&nbsp;</a>
			</li><li ><a qtip="地方重点工程"
				<c:if test="${pitem=='2'}">class="current"</c:if>
				href="<c:url value='/pmajor/qx/main.jsp'/>">地方重点工程&nbsp;</a>
			</li><li><a qtip="国省道大中修及改扩建项目" 
				<c:if test="${pitem=='3'}">class="current"</c:if>
				href="<c:url value='/pmaintain/qx/main.jsp'/>">国省道建设&nbsp;</a>
			</li><li><a qtip="危桥(隧道)改造"
				<c:if test="${pitem=='4'}">class="current"</c:if>
				href="<c:url value='/pbridge/qx/main.jsp'/>">危桥(隧道)改造&nbsp;</a>
			</li><li><a qtip="渡改桥"
				<c:if test="${pitem=='5'}">class="current"</c:if>
				href="<c:url value='/pferry/qx/main.jsp'/>">渡&nbsp;改&nbsp;桥&nbsp;</a>
			</li><li><a qtip="农村公路通达通畅建设"
				<c:if test="${pitem=='6'}">class="current"</c:if>
				href="<c:url value='/pvillage/qx/main.jsp'/>">农村公路建设&nbsp;</a>
			</li><li><a qtip="勘察设计、施工、监理单位信息"
				<c:if test="${pitem=='7'}">class="current"</c:if>
				href="<c:url value='/penterprise/qx/main.jsp'/>">企业信用&nbsp;</a>
			</li><li></ul>
				</c:if>
	 </div>
	</div>
	<!-- end menu -->
</div>